﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Pyramid.Extentions;

namespace Pyramid.Models
{
	/// <summary>
	/// 财务项目
	/// </summary>
	public class FinanceProject
	{
		[Display(Name = "序号")]
		public int Id { get; set; }

		[Display(Name = "项目名称")]
		[MaxLength(20)]
		[Required]
		public string Name { get; set; }

		[Display(Name = "付款方类型")]
		public int PayerType { get; set; }

		[NotMapped]
		public PayerTypes PayerTypeEnum
		{
			get { return (PayerTypes)PayerType; }
		}

		[NotMapped]
		public string PayerTypeString
		{
			get { return PayerTypeEnum.ToDescription(); }
		}

		[Display(Name = "类型")]
		public int ProjectType { get; set; }

		[NotMapped]
		public FinanceProjectTypes ProjectTypeEnum
		{
			get { return (FinanceProjectTypes)ProjectType; }
		}

		[NotMapped]
		public string ProjectTypeString
		{
			get { return ProjectTypeEnum.ToDescription(); }
		}

		[Display(Name = "备注")]
		[MaxLength(200)]
		public string Remark { get; set; }
	}
}